# !/usr/bin python3                                
# encoding: utf-8 -*-
# @file: jisuan_test.py                       
# @author   : wjd
# @Time: 2024/4/2 17:10


json_linst = [{
    "tx_hash": "d6a7a5aa4ef9b657d4231a9d3b2637471db84f360811459b5e55ec3974c29f9b",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 4160,
    "is_coinbase": False,
    "confirmed_number": 17440,
    "locked": False
}, {
    "tx_hash": "8c228f28ca99699d887ce2f70da9c5bcce87ff5991953d6aac0be9308da8c73d",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 18080010,
    "is_coinbase": False,
    "confirmed_number": 13956,
    "locked": False
}, {
    "tx_hash": "3786b21da2611b4dfe264a078d5eaccf7f833b541da89c8acfd67e17212ecca0",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 290372215,
    "is_coinbase": False,
    "confirmed_number": 13071,
    "locked": True
}, {
    "tx_hash": "c82fd55e527ede1132a0ee71332ba3b7ddc54df6aa6b00aeef8278b244b5c208",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 211418034,
    "is_coinbase": False,
    "confirmed_number": 12913,
    "locked": False
}, {
    "tx_hash": "b7964107a91da91a1512ed1e8fa09a0561f9304f31fd62f3691be6e3fb71f705",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 147865616,
    "is_coinbase": False,
    "confirmed_number": 12771,
    "locked": True
}, {
    "tx_hash": "787bb99759c344015335190a08a53fb5217dcf8b14902df2007a4aad5c0d4598",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 344395912,
    "is_coinbase": False,
    "confirmed_number": 12386,
    "locked": True
}, {
    "tx_hash": "fe3d3f9ae2635b388edd06987034c6528698b07e70d12c825057228d520eb37f",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 233191248,
    "is_coinbase": False,
    "confirmed_number": 12102,
    "locked": False
}, {
    "tx_hash": "202c3551fbeb6ff6b9602f9328f461ed87643880fa358dbf9aea1c60ae18847c",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 179018155,
    "is_coinbase": False,
    "confirmed_number": 11615,
    "locked": False
}, {
    "tx_hash": "c4863294ba1906dd65437b0092cb3b20506ec5a2d83d4677a9400046967abd48",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 59688720,
    "is_coinbase": False,
    "confirmed_number": 11246,
    "locked": False
}, {
    "tx_hash": "3dcdaf05e8beef50f5179fc48638d390d0cd716d4c9b5e59219b1688fb10b10d",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 200793864,
    "is_coinbase": False,
    "confirmed_number": 10404,
    "locked": False
}, {
    "tx_hash": "63e6f7241ad2217d913bbc07c77ad18f85c944193a8b4ee70016c35d888e5e4f",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 316281992,
    "is_coinbase": False,
    "confirmed_number": 9591,
    "locked": True
}, {
    "tx_hash": "a55fd79ba872019a796b7bb2a025c7d9eb06b5ded07f850affea6c664d6a09c7",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 379700493,
    "is_coinbase": False,
    "confirmed_number": 6819,
    "locked": True
}, {
    "tx_hash": "6b3e3f05c81e0e0c64b44d758be9ffabc20d7a8c8d837bcb306f653a3d6e24e8",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 26348603,
    "is_coinbase": False,
    "confirmed_number": 6670,
    "locked": False
}, {
    "tx_hash": "6cfcaafba9b0fb1d7e0cd9f507bd2430aaeb994a447422f101fcc5f6d145c16c",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 173063698,
    "is_coinbase": False,
    "confirmed_number": 6111,
    "locked": True
}, {
    "tx_hash": "54243a2e026ac2592c0a13a087f73e515f9e481937f83cb3eff50d2de6bd6572",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 20143534,
    "is_coinbase": False,
    "confirmed_number": 5689,
    "locked": False
}, {
    "tx_hash": "2facd1d453c65978a9e09d4a796e893df1fbdf087840eeb248dd6a1b7117b4d8",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 538320373,
    "is_coinbase": False,
    "confirmed_number": 5417,
    "locked": True
}, {
    "tx_hash": "b4a7d14738f9698ff88f0b680131bcaae94cbc57bdd7e1b6cd90193686e5c3da",
    "vout_n": 0,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 646370653,
    "is_coinbase": True,
    "confirmed_number": 5217,
    "locked": True
}, {
    "tx_hash": "82e990c83c78db8f1566923b27eb7b426a9db04d71d11242fee1c273e246463c",
    "vout_n": 924,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 1880,
    "is_coinbase": False,
    "confirmed_number": 5128,
    "locked": False
}, {
    "tx_hash": "ed039ac3892a075908d03ea0db3abcac106853000bb033d82c63fb622b960e3b",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 600720502,
    "is_coinbase": False,
    "confirmed_number": 4694,
    "locked": True
}, {
    "tx_hash": "35fbb2bb095fd7fd9844e4dbd3946fe1323726ba20cdb4d27892c9301b48b8a1",
    "vout_n": 0,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 660752091,
    "is_coinbase": True,
    "confirmed_number": 4677,
    "locked": True
}, {
    "tx_hash": "e58517db334d71d4f5077a8ec11433014562d09ed7696ca48f769c37a9ba80a3",
    "vout_n": 0,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 656914272,
    "is_coinbase": True,
    "confirmed_number": 3967,
    "locked": True
}, {
    "tx_hash": "343e67b5b221ed4902782866058c386414a6b2380a7610b794ef7ffcb48d6b67",
    "vout_n": 0,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 684169949,
    "is_coinbase": True,
    "confirmed_number": 3906,
    "locked": True
}, {
    "tx_hash": "81568111f8065eb71ec29919e2473caea9385d1a58d0f9c6a400325ccc1ff7f2",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 509631398,
    "is_coinbase": False,
    "confirmed_number": 2888,
    "locked": True
}, {
    "tx_hash": "cc3d2ae9ed7f719dccc5475638ace7cfce03af7376f573bb456776b0dfce46c4",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 644568642,
    "is_coinbase": True,
    "confirmed_number": 2672,
    "locked": True
}, {
    "tx_hash": "5f3dafcdd142358b332e0939d37174b76472735df8df29325901d2c7d18a152c",
    "vout_n": 642,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 546,
    "is_coinbase": False,
    "confirmed_number": 2625,
    "locked": True
}, {
    "tx_hash": "06479023d43028716b704037b1408711e6ecac43cff59529b53e0e9ccf262ac4",
    "vout_n": 115,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 546,
    "is_coinbase": False,
    "confirmed_number": 2597,
    "locked": True
}, {
    "tx_hash": "04df1cc7569ff2e7205b35056b830cafe311701215252d2c8715286e9a1f9efc",
    "vout_n": 0,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 600,
    "is_coinbase": False,
    "confirmed_number": 2185,
    "locked": False
}, {
    "tx_hash": "9dd11a44195201c8f5b75c48755d1ccd3a34a8d640872280a3cc204c77187bd3",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 654168344,
    "is_coinbase": True,
    "confirmed_number": 1990,
    "locked": True
}, {
    "tx_hash": "8f35561442bb84ad987f1f32bc385c3c877114b1a221571eb9a535715ea426a6",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 636969662,
    "is_coinbase": True,
    "confirmed_number": 1723,
    "locked": True
}, {
    "tx_hash": "c0a21a35fc897d4c11b90d3d10a08ff27ddefee37f17894c32880104155edd3b",
    "vout_n": 486,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 546,
    "is_coinbase": False,
    "confirmed_number": 1460,
    "locked": True
}, {
    "tx_hash": "b7030f6fdf68665a02ea0d773c2a5fe35c410a5aece296d51250ebbb1d76446d",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 634803963,
    "is_coinbase": True,
    "confirmed_number": 1216,
    "locked": True
}, {
    "tx_hash": "d0eb2d477784a892f012943dab7f11dc47fcf1d0fd236ac483237e3048e87ff2",
    "vout_n": 638,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 546,
    "is_coinbase": False,
    "confirmed_number": 1139,
    "locked": True
}, {
    "tx_hash": "5b77b51da7ee61cf36ba593f2339a2dd82c4d298e89f2d0c57613194a9f8b04d",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 661773265,
    "is_coinbase": True,
    "confirmed_number": 1076,
    "locked": True
}, {
    "tx_hash": "2efef8dff7808b35365af934ac8e14c76a1240d40446e8d166d73fdafa7a2cce",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 634027004,
    "is_coinbase": True,
    "confirmed_number": 873,
    "locked": True
}, {
    "tx_hash": "9c8572d8411e038422892f00e59a13b57cb3c25726fc526c2e9ba63858b9b78d",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 17906835,
    "is_coinbase": False,
    "confirmed_number": 699,
    "locked": False
}, {
    "tx_hash": "4bd025d7a06e3863769a0e4f5bdb3564913da187c2c5d6e3095d9d517c73004f",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 52085224,
    "is_coinbase": False,
    "confirmed_number": 683,
    "locked": False
}, {
    "tx_hash": "383e313ae1cd1d4279cae4d06789399e73b88a1c3cba443241d06b4c94631825",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 19856795,
    "is_coinbase": False,
    "confirmed_number": 571,
    "locked": False
}, {
    "tx_hash": "625e9bd55ef803d9b1110d06cf05106d824d37e85e7d9623790ee1842fa6492d",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 645118488,
    "is_coinbase": True,
    "confirmed_number": 498,
    "locked": True
}, {
    "tx_hash": "f8e3bdd68e2d07d5f1f3f192d25666454d30be7ccf5657f17c06bf35f4070978",
    "vout_n": 51,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 600,
    "is_coinbase": False,
    "confirmed_number": 479,
    "locked": False
}, {
    "tx_hash": "87b2d6e716e6fbf24c45b8ef113333c88fd238c7ab87e6935d7aea5d154b4652",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 156114780,
    "is_coinbase": False,
    "confirmed_number": 258,
    "locked": False
}, {
    "tx_hash": "4f9c4a9815a7d077aa8c708babeb19d5ccf60706762f65b1abe18363f1fefb08",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 647903672,
    "is_coinbase": True,
    "confirmed_number": 214,
    "locked": False
}, {
    "tx_hash": "5752e66964c732a8d43260bd34e2082971f9d48c3fa71141a66a3d055dff1762",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 656860351,
    "is_coinbase": True,
    "confirmed_number": 210,
    "locked": False
}, {
    "tx_hash": "3253ffe5fa3dfd77811ba7d3427b8236844fff18ea87228080b5b6f22382208c",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 643065250,
    "is_coinbase": True,
    "confirmed_number": 205,
    "locked": False
}, {
    "tx_hash": "121dbc68592544bd573e10a81b8c561d345a55064bc3e102b12b19308a5ae0ec",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 637480144,
    "is_coinbase": True,
    "confirmed_number": 177,
    "locked": False
}, {
    "tx_hash": "c4f1051fb7a771b54cf08feac3dd524e3f48cc0b9cb1fdb60f2ebe92fa7733d0",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 636361099,
    "is_coinbase": True,
    "confirmed_number": 137,
    "locked": False
}, {
    "tx_hash": "6e32d619e8481631b6fc0e936c79f0221fd163c546f8a91111fef56f33e4364c",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 26845740,
    "is_coinbase": False,
    "confirmed_number": 130,
    "locked": False
}, {
    "tx_hash": "b7dc1eb460375439fa04fce53d9cad615ccef2161d640684ef528bf7a9c6f73f",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 637213703,
    "is_coinbase": True,
    "confirmed_number": 116,
    "locked": False
}, {
    "tx_hash": "99916538e1b873e3e05079d9497d4f818efe494dfd3ed3f49aa0f384bfedec35",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 689219261,
    "is_coinbase": True,
    "confirmed_number": 80,
    "locked": False
}, {
    "tx_hash": "a47d7e06f46eea62dfe238b824bd152082bdef8c41a04389dc0d2aa53c578b91",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 646162397,
    "is_coinbase": True,
    "confirmed_number": 65,
    "locked": False
}, {
    "tx_hash": "0541096fbea006a018356eefe1d2ffd93d192e2e5e21089e4bc3bd451d063377",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 642585544,
    "is_coinbase": True,
    "confirmed_number": 64,
    "locked": False
}, {
    "tx_hash": "92e6108ba3eb91e6f4ca9fecfd868304c4418d8c7bc8edf8fcc7589451f30745",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 646555318,
    "is_coinbase": True,
    "confirmed_number": 28,
    "locked": False
}, {
    "tx_hash": "1f1e4e74f506db65e615d93487d6091895e3ab1c4a24b8183c3f49e987d2b38a",
    "vout_n": 1,
    "address": "32BfKjhByDSxx3BM5vUkQ3NQq9csZR6nt6",
    "amount": 635968411,
    "is_coinbase": True,
    "confirmed_number": 17,
    "locked": False
}]

amount_sum = 0
for i in json_linst:
    amount_sum += i["amount"]
print(f"总体的amount：{amount_sum}")

locked_sum = 0
for i in json_linst:
    if i["locked"]:
        locked_sum += i["amount"]
print(f"锁定的amount：{locked_sum}")

unlocked_sum = 0
for i in json_linst:
    if not i["locked"]:
        unlocked_sum += i["amount"]
print(f"未锁定的amount：{unlocked_sum}")

coinbase_sum = 0
for i in json_linst:
    if i["is_coinbase"] and i["locked"] and i["confirmed_number"] > 100:
        coinbase_sum += i["amount"]
print(f"爆块+确认数>100+未锁定的 amount：{coinbase_sum}")

coinbase_sum = 0
for i in json_linst:
    if i["is_coinbase"]==False and i["locked"] and i["confirmed_number"] > 100:
        coinbase_sum += i["amount"]
print(f"非爆块+确认数>100+未锁定的 amount：{coinbase_sum}")
